package com.funo.wcity.app.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.funo.wcity.app.entity.TblCompanyTypes;

@Repository("tblCompanyTypesDAO")
public class TblCompanyTypesDAO extends DefaultBaseDao<TblCompanyTypes,Integer>{
	
	/**
	 * 查询公司类型
	 * @param
	 * 		IdEmployees
	 * 			用户id
	 */
	public List getTblCompaniesList(String IdEmployees) {
		StringBuffer sql = new StringBuffer(
				"select idCompanyType,companyTypeName from tblcompanytypes c order by c.idCompanyType");
		return this.jdbcTemplate.queryForList(sql.toString());
	}
	
	/**
	 * 通过多个公司类型查询
	 */
	public List findTblCompaniesList(String idCompanyType){
		StringBuffer hql = new StringBuffer("From TblCompanyTypes ty where ty.idCompanyType in(").append(idCompanyType).append(")");
		return this.hibernateTemplate.find(hql.toString());
	}
}
